﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SqlSugar;

namespace Model.EntityModel.Auth
{
    /// <summary>
    /// 组别主表
    ///</summary>
    [SugarTable("GROUP_MASTER")]
    public class Group
    {
        /// <summary>
        /// 组别ID (全局唯一GUID)
        ///</summary>
        [SugarColumn(ColumnName = "ID", IsPrimaryKey = true, Length = 36)]
        public string Id { get; set; } = Guid.NewGuid().ToString();  // 改为GUID

        /// <summary>
        /// 组别名称 
        ///</summary>
        [SugarColumn(ColumnName = "NAME")]
        public string Name { get; set; }

        /// <summary>
        /// 组别分类(权限组/项目组等) 
        ///</summary>
        [SugarColumn(ColumnName = "CATEGORY")]
        public string Category { get; set; }

        /// <summary>
        /// 备注说明 
        ///</summary>
        [SugarColumn(ColumnName = "REMARK")]
        public string Remark { get; set; }

        /// <summary>
        /// 是否有效(Y/N) 
        ///</summary>
        [SugarColumn(ColumnName = "IS_ACTIVE", Length = 1)]
        public string IsActive { get; set; } = "Y";

        [SugarColumn(ColumnName = "CREATED_BY")]
        public string CreatedBy { get; set; }

        [SugarColumn(ColumnName = "CREATED_AT")]
        public DateTime? CreatedAt { get; set; } = DateTime.Now;

        [SugarColumn(ColumnName = "MODIFIED_BY")]
        public string ModifiedBy { get; set; }

        [SugarColumn(ColumnName = "MODIFIED_AT")]
        public DateTime? ModifiedAt { get; set; }
    }
}
